package com.primb.bench.project.home.contract;

import android.content.Intent;

import com.primb.baselibs.base.BasePresenter;
import com.primb.bench.common.dialog.SelectListDialog;
import com.primb.bench.project.home.entity.EnsureObjectEntity;
import com.primb.bench.project.home.entity.HttpApplyResultEntity;
import com.primb.bench.project.home.entity.HttpResultEntity;
import com.primb.bench.project.home.entity.HttpStrEntity;
import com.primb.bench.project.home.entity.KeyEntity;

import java.util.List;

import rx.Observable;

/**
 * Created by Chen on 2017/5/17.
 * 功能描述：
 */

public class AddEnsureInfoContract {

    public interface View {
        void showLoading();

        void hideLoading();

        void showErrorMsg(String msg);

        void setEntityToView(EnsureObjectEntity entity);

        void resetInfo();

        SelectListDialog showListDialog(int requestCode);

        void saveResultForBack();

        String getEnsureMoney();

        boolean getIsNew();
    }

    public interface Presenter extends BasePresenter {

        void getPickerList(int code, String type);

        void handleInfoForList(int code, KeyEntity data);

        boolean isEntityEmpty(EnsureObjectEntity entity);

        void saveEnsureObject(EnsureObjectEntity entity, String priceId, boolean isNew);

        void onViewClick(int viewId);

    }

    public interface Model {
        Observable<List<KeyEntity>> getPickerList(int code, String type);

        Observable<HttpStrEntity> saveEnsureObject(EnsureObjectEntity entity, String priceId, boolean isNew);
    }
}